From a755adc58d6bc5ebb1a9c0ffa4825f44307420cf Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 4 Jan 2002 03:34:12 +0000 Subject: [PATCH] add mention of gtk_widget_add_events() and GTK_CAN_FOCUS 2002-01-03 Havoc Pennington * gtk/tmpl/gtkdrawingarea.sgml: add mention of gtk_widget_add_events() and GTK_CAN_FOCUS --- docs/reference/ChangeLog | 5 +++++ docs/reference/gtk/tmpl/gtkdrawingarea.sgml | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index ec94359f97..69080fead5 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2002-01-03 Havoc Pennington + + * gtk/tmpl/gtkdrawingarea.sgml: add mention of + gtk_widget_add_events() and GTK_CAN_FOCUS + 2002-01-04 Matthias Clasen * gtk/tmpl/gtktextview.sgml: Small additions. diff --git a/docs/reference/gtk/tmpl/gtkdrawingarea.sgml b/docs/reference/gtk/tmpl/gtkdrawingarea.sgml index 7af01b945d..4c6346e065 100644 --- a/docs/reference/gtk/tmpl/gtkdrawingarea.sgml +++ b/docs/reference/gtk/tmpl/gtkdrawingarea.sgml @@ -16,7 +16,8 @@ the application may want to connect to: Mouse and button press signals to respond to input from - the user. + the user. (Use gtk_widget_add_events() to enable events + you wish to receive.) @@ -79,6 +80,14 @@ gdk_window_invalidate_rect() are equally good ways to do this. You'll then get an expose event for the invalid region. + +To receive mouse events on a drawing area, you will need to enable +them with gtk_widget_add_events(). To receive keyboard events, +you will need to set the #GTK_CAN_FOCUS flag on the drawing area, and +should probably draw some user-visible indication that the drawing +area is focused. See gtk_paint_focus() for one way to draw focus. + + -- 2.30.2